<template>
	<view>
		<view class="nav" v-if="!list">
			<text>为确保订单尽快送达、请务必确认收货地址正确</text>
		</view>
		<view class="address">
			<view class="info">
				<text>收货人:</text>
				<text class="userName">{{defAddress.name||""}}</text>
				<text class="r">{{defAddress.phone||""}}</text>
			</view>
			<view class="addressInfo">
				<image src="https://wx.hnlxyj.com/web/v2.0/static/image/icon/my_address@2x.png" mode="widthFix" class="addressImg"></image>
				<image src="https://wx.hnlxyj.com/web/v2.0/static/image/icon/my_edit@2x.png" mode="widthFix" class="edit r" @tap="url" v-if="!list"></image>
				<view>
					<text>收货地址:</text>
					<text>{{defAddress.area||""}}{{defAddress.address||""}}</text>
				</view>

			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
		  defAddress: {  // 页面列表数据
		    type: Object,
		    //default: {}
		  },
		  list:{
			  type:Number
		  }
		},
		data() {
			return {
				mid:"",
			};
		},
		onShow() {
		
		},
		methods: {
			url(){
				uni.navigateTo({
					url:"/pages/aduit/address"
				})
			}
		},
	}
</script>

<style lang="scss">
	.nav{
		height: 60rpx;
		line-height:  60rpx;
		background: #f90;
		color: #fff;
		font-size: 24rpx;
		padding: 0 40rpx;
	}
	.r{
		float:right;
	}
	.address {
		padding: 30rpx 30rpx 30rpx 20rpx;
		// height: 160rpx;
		background: #fff;
		margin-bottom: 20rpx;
		font-size: 24rpx;
		.info{
			padding: 0 20rpx 10rpx 60rpx;
		}
		.addressInfo{
			image{
				display: inline-block;
				vertical-align: middle;
			}
			>view{
				width: 560rpx;
				text-align: left;
				vertical-align: top;
				display: -webkit-box;
				line-height: 1.4;
				height: 80rpx;
				float: right;
				margin-right: 60rpx;
				margin-top: 8rpx;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				overflow: hidden;
				text-overflow: ellipsis;
			}
		}
	}
	.edit{
		width:30rpx;
		margin-top: 8rpx;
	}
	.addressImg{
		width:48rpx;
	}

</style>
